<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div></div>
    <script>
        var str =location.search;
        console.log(str);//输入中文数据 会拿到乱码 后面解决
        var substr=str.substr(1);
        var user=substr.split('=');
        var div = document.querySelector('div');
        div.innerHTML='你好'+user[1];
    </script>
</body>
</html>